<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="../../yl/index.css" />
    <link rel="stylesheet" href="../../style/index.css" />
    <title>大北极联合体活动会议</title>
  </head>

  <body>
    <div id="app" v-cloak>
      <div class="title" style="margin: 0 10px">
        <div style="padding: 5px">
          大北极联合体活动会议&nbsp;&nbsp;<el-input
            v-model="page.value1"
            style="width: 200px; margin-right: 10px"
            placeholder="请输入内容"
          ></el-input>
          <el-button
            icon="Search"
            style="margin: 0; margin-right: 10px"
            @click="check"
            >查询</el-button
          >
          <el-button
            icon="Refresh"
            style="margin: 0; margin-right: 10px"
            @click="reset"
            >重置</el-button
          >
          <!-- <button class="button" @click="personalAdds()">添加类型</button> -->
          <el-button
            type="primary"
            icon="CirclePlus"
            style="margin: 0; margin-right: 10px"
            @click="workteamAdd"
            >添加</el-button
          >
          <!-- <el-button type="warning" icon="Download" style="margin: 0; margin-right: 10px;" @click="personalAdd"
                    plain round>批量导入</el-button>
                <el-button type="success" icon="Upload" style="margin: 0; margin-right: 10px;" @click="personalAdd"
                    plain round>批量导出</el-button>
                <el-button type="danger" icon="Delete" style="margin: 0; margin-right: 10px;" @click="personalAdd" plain
                    round>批量删除</el-button> -->
        </div>
      </div>
      <div class="body">
        <div class="left">
          <el-tree
            id="tree"
            default-expand-all
            :data="treeData"
            :props="{ label: 'Organization_name', children: 'children' }"
            style="max-width: 600px"
            @node-click="handleNodeClick"
            :expand-on-click-node="false"
            :data-options="JSON.stringify({ 'TableName': 'north_organization', 'NodeCode': '','primary_key':'Organization_SerialNumber' })"
            style="max-width: 600px"
            :data="treeData"
            @node-click="handleNodeClick"
          >
          </el-tree>
        </div>
        <div class="right">
          <el-table
          show-overflow-tooltip
            id="table"
            :data-options="JSON.stringify({ 'TableName': 'party_organization_activities','primary_key':'Party_Organization_Activity_SerialNumber'})"
            height="450"
            ref="multipleTable"
            tooltip-effect="dark"
            :data="Tabletdata"
            @selection-change="handleSelectionChange"
          >
            <!-- 修复：删除重复的列循环 -->
            <el-table-column
              min-width="180"
              v-for="column in columns"
              :key="column.COLUMN_NAME"
              :prop="column.COLUMN_NAME"
              :label="column.COLUMN_COMMENT"
            >
              <template v-slot="{row}">
                {{ row[column.COLUMN_NAME] }}
              </template>
            </el-table-column>

            <el-table-column label="操作" fixed="right" width="162">
              <template #default="{row}">
                <el-button
                  size="small"
                  style="margin-right: 10px"
                  @click="handleEdit(row)"
                >
                  编辑
                </el-button>
                <el-dropdown trigger="click">
                  <el-button type="danger" size="small">
                    更多<el-icon class="el-icon--right"><arrow-down /></el-icon>
                  </el-button>
                  <template #dropdown>
                    <el-dropdown-menu>
                      <el-dropdown-item @click="handleNews(row)">
                        新闻发布
                      </el-dropdown-item>
                      <el-dropdown-item @click="handleDelete(row)">
                        删除
                      </el-dropdown-item>
                    </el-dropdown-menu>
                  </template>
                </el-dropdown>
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            style="margin-top: 1%"
            :current-page="page.PageNumber"
            :page-size="page.RowAmount"
            :page-sizes="[10, 100, 200, 300, 400]"
            layout="total, sizes, prev, pager, next, jumper"
            :total="Total"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </div>
    </div>
    <script src="../../utils/utils.js"></script>
    <script src="../../config/config.js"></script>
    <script src="../../utils/mixins.js"></script>
    <script src="../../yl/vue.js"></script>
    <script src="../../yl/index.js"></script>
    <script src="../../yl/zh-cn.mjs"></script>
    <script src="../../yl/index.iife.min.js"></script>
    <script src="../../yl/jquery.min.js"></script>
    <script src="../../utils/jquery.cookie.js"></script>
    <script src="../../api/request.js"></script>
    <script src="js/index.js"></script>
  </body>
</html>
